package com.robot.topology.strategy.deterministic;

import com.robot.topology.graph.domain.Edge;
import com.robot.topology.tools.StrategyTools;

public class ShortestPathBM extends Deterministic{

	/**
	 * @param args
	 */
	public static final Double shortBMRatio = (double)0.2;
	public static final Double shortBMReward = (double) 1;
	public static final Double shortBMPunish = (double) 0;
	
	public ShortestPathBM() {
		this.setRatio(shortBMRatio);
		this.setReward(shortBMReward);
		this.setPunishment(shortBMPunish);
	}
	

	@Override
	public void updateEdgeToReward(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.invProportionalBM(edgeTUpdate.getWeight(),  this.getRatio(), this.getReward(), this.pathLength));
		
	}

	public void updateEdgeToPunish(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.invProportionalBM(edgeTUpdate.getWeight(),  this.getRatio(), this.getPunishment(),  this.pathLength));
		
	}
	
}
